package net.chrisrichardson.ec2deployer.cluster

class ListSplitterTest extends GroovyTestCase {

    public void test() {
        def list = [1,2,3,4]
        def ls = new ListSplitter(list)

        assertEquals ([], ls.next(0))
        assertEquals ([1,2], ls.next(2))
        assertEquals (3, ls.nextOne())
        assertEquals ([4], ls.next(1))
        assertEquals ([], ls.next(0))
    }
}